<!DOCTYPE html>
<html lang="en">


<head th:replace="~{_fragments:: head(~{::title})}">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索</title>

    <link rel="stylesheet" href="../static/semantics-dist/semantic.min.css" th:href="@{/semantics-dist/semantic.min.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">

    <script src="../static/js/jquery-3.7.1.min.js" th:src="@{/js/jquery-3.7.1.min.js}" ></script>
    <script src="../static/semantics-dist/semantic.min.js" th:src="@{/semantics-dist/semantic.min.js}" ></script>
</head>
</head>
<body>
<nav  th:replace="~{_fragments ::menu(1)}" class = "ui inverted attached segment m-padded-tb-mini m-shadow-small">

</nav>
<br><br>
<!--    中间内容   搜索-->
    <div  class="m-container-small m-padded-tb-big">
        <div class="ui container">
            <!--header-->
            <div class="ui teal top attached segment">
                <div class="ui  middle aligned two column grid">
                    <div class="column">
                        <h3 class="ui teal header">搜索结果</h3>
                    </div>
                    <div class="right aligned column">
                        共 <h2 class="ui orange header m-inline-block m-text-thin"  th:text="${page.totalElements}"> 14 </h2> 个
                    </div>
                </div>
            </div>

            <!--正文-->

            <div class="ui attached teal   segment">

                <!--                    单独文章-->
                <div class="ui padded segment m-padded-tb-large" th:each="blog :${page.content}">
                    <div class="ui mobile reversed stackable  grid" >

                        <div class="ui eleven wide column">


                            <h3 class="ui header" ><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black" th:text="${blog.title}">深化单词</a></h3>
                            <p class="m-text" th:text="|${blog.description}......|"> 深化单词理解
                                上下文学习：将单词放入句子或短文中，理解其在具体语境中的含义和用法。并更好地理解其背后的文化和语境。
                                词根词缀：学习词根和词缀的知识，更容易记忆和推测新单词的含义。
                                同义词和反义词：并在写作和阅读中更灵活地运用。</p>
                            <!--                                    引入新的参数才会让描述换行 -->


                            <div>
                                <div class="ui grid">
                                    <div class="twelve wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img alt=""  class="ui avatar image" src="../static/images/mio1.png"  th:src="${blog.user.avatar}" > <!-- 头像 -->

                                                <div class="content">
                                                    <a href="#" class="header" th:text="${blog.user.nickname}">长野原美绪</a> <!-- 名字 -->
                                                </div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon" ></i> <span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2024-2-15</span>
                                            </div> <!-- 时间 -->
                                            <div class="item">
                                                <i class="eye icon"></i> <span th:text="${blog.views} ">55555</span>
                                            </div> <!-- 观看数 -->

                                        </div>
                                    </div>
                                    <div class="ui right aligned middle aligned four wide  column m-padded-mini m-text-thin">
                                        <a href="#" target="_blank" class="ui teal mini basic  left pointing label" th:text="${blog.type.name}">认知升级</a>

                                    </div>
                                </div>
                            </div>



                        </div>
                        <!--                                &lt;!&ndash;                        首图&ndash;&gt;-->

                        <div class="five wide column">
                            <div class="image-wrapper">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img  src="../static/images/mio1.png" th:src="@{${blog.firstPicture}}"  alt="" class="ui img3to2   image">
                                </a>
                            </div>
                        </div>
                    </div>
                    <!--                        </div>-->
                </div>
            </div>
            <div>
<!--                <div class="ui attached segment"  th:if="${page.totalPages}>1">-->
<!--                    <div class="ui middle aligned two column grid">-->
<!--                        <div class="  column">-->
<!--                            <a href="#" th:href="@{/(page=${page.number}-1)}"  th:unless="${page.first}" class="ui mini teal basic button">上一页</a>-->
<!--                        </div>-->
<!--                        <div class=" right aligned column">-->
<!--                            <a href="#" class="ui teal basic button" th:href="@{/(page=${page.number}+1)}"  th:unless="${page.last}">下一页</a>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="ui attached segment" th:if="${page.totalPages > 1}">
                    <div class="ui grid">
                        <div class="eight wide column">
                            <div class="left aligned column">
                                <a href="#" th:href="@{'/search?page=' + ${page.number - 1} + '&query=' + ${query}}" th:unless="${page.first}" class="ui teal left aligned basic button">上一页</a>
                            </div>
                        </div>
                        <div class="eight wide column">
                            <div class="right aligned column" style="float: right;">
                                <a href="#" th:href="@{'/search?page=' + ${page.number + 1} + '&query=' + ${query}}" th:unless="${page.last}" class="ui teal right aligned basic button">下一页</a>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

<br>
<br>


    <footer th:replace="~{_fragments :: footer}" class="ui inverted vertical segment m-padded-tb-massive  ">

        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">

                <div class="three wide column">

                    <div class="middle aligned">

                        <img src="../static/images/mio1.png"
                             class="ui middle aligned round image" alt="" style="width: 150px">
                    </div>


                </div>
                <div class="three wide column ">
                    <h4 class ="ui inverted header" >最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">等待填充1</a>
                        <a href="#" class="item">等待填充2</a>
                        <a href="#" class="item">等待填充3</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class ="ui inverted header">github</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">yonghuname@github.com</a>
                        <a href="#" class="item">等待填充</a>
                        <a href="#" class="item">等待填充</a>
                    </div>
                </div>

                <div class="seven wide column">

                    <h4 class ="ui inverted header">博客介绍</h4>

                    <p  class="m-text-thin m-text-spaced m-opacity-mini ">这是我的个人博客,会分享文章，也可能被拿来做todolist</p>

                </div>
            </div>


            <div class="ui inverted section divider m-padded-tb-">
            </div> <p class="m-text-thin m-text-spaced m-opacity-mini">All rights reserved  </p>
        </div>

    </footer>
</body>

<!--<script  src="https://cdn.jsdeliver.net/semantic-ui/2.2.4/semantic.min.js"></script>-->
<!--<script  src="https://cdn.jsdeliver.net/npm/jquery@3.2/dist/jquery.min.js"></script>-->

</html>

<script>


    $('.menu.toggle').click(function() {
        $('.m-item').toggleClass('m-mobile-hidden');
    });

    $('#likesButton').popup( {
        popup :$('.likesImg.popup'),
        on : "click",
        position:"bottom center"
    });


</script>